package com.bdqn.ch03.proxy;

import com.bdqn.ch03.dao.Buye;
import com.bdqn.ch03.dao.impl.EealBuyer;
import org.apache.log4j.Logger;

public class IntermediaryImpl implements Buye {
    private Logger logger =  Logger.getLogger(IntermediaryImpl.class);
    private Buye target;
    public IntermediaryImpl(Buye target){
        this.target = target;
    }

    @Override
    public String havealook() {
        before();
        String feedbak = target.havealook();
        after();
        return "看房记录，买家防窥"+feedbak;
    }
    public void before(){
    logger.debug("前期准备");
    logger.debug("查找房子");
    logger.debug("沟通时间");
    }

    public void after(){
        logger.debug("后期处理");
        logger.debug("沟通意见");
    }
}
